package org.spbsu.apco.common.task.impl.matrix;

import org.spbsu.apco.common.data.core.DurationEstimable;
import org.spbsu.apco.common.task.core.BaseTask;

import java.util.List;

/**
 * User: ortemij
 * Date: 07.01.13
 * Time: 14:57
 */
public class RowConstructionTask extends BaseTask<Double, Double[]> implements DurationEstimable<Double> {

    @Override
    public Double[] execute(final List<Double> inputData) throws Exception {
        return inputData.toArray(new Double[inputData.size()]);
    }

    @Override
    public int estimateDuration(List<Double> arguments) {
        return arguments.size();
    }
}
